import 'package:flutter/material.dart';

class HeaderAvatar extends StatelessWidget {
  String name;
  HeaderAvatar({Key key, this.name}) : super();

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.only(left: 5, top: 15, right: 15, bottom: 15),
      child: Container(
        decoration: BoxDecoration(
//                color: Colors.red
            ),
        child: Row(
          children: [
            SizedBox(
              width: 8,
            ),
            ClipOval(
              child: Image.network(
                  "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F201911%2F28%2F20191128173459_tehxm.thumb.700_0.jpg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1622282263&t=b487cd8aef9a22b8100352a248e63e6b",
                  fit: BoxFit.cover,
                  height: 70,
                  width: 70),
            ),
            SizedBox(width: 20),
            Container(
                child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Text(
                  "$name",
                  style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
                ),
                // Container(
                //   margin: EdgeInsets.only(top: 10),
                //   child: Row(
                //     children: [
                //       Text(
                //         "0 关注  | "
                //       ),
                //       Text(
                //         "0 粉丝"
                //       )
                //     ],
                //   ),
                // )
              ],
            )),
            SizedBox(width: 10),
            // TextButton(
            //   onPressed: (){
            //     print("点击了加关注");
            //   },
            //   style: ButtonStyle(
            //       padding: MaterialStateProperty.all(EdgeInsets.only(left: 10,right: 10,top:5,bottom: 5)),
            //       backgroundColor: MaterialStateProperty.all(Colors.red)
            //   ),
            //   child: Text(
            //     "+ 关注",
            //   ),
            // )
          ],
        ),
      ),
    );
  }
}
